{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": [],
      "gpuType": "T4"
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    },
    "accelerator": "GPU"
  },
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "fddBIgf37ktK",
        "outputId": "f4d7fb8b-b0ec-4f77-e9b9-4c56c56ad105"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "2.5.1+cu121\n"
          ]
        }
      ],
      "source": [
        "import torch\n",
        "print(torch.__version__)"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "#验证cuda是否ok\n",
        "import torch\n",
        "print(torch.backends.cudnn.version())\n",
        "print(torch.cuda.is_available())\n",
        "print(torch.backends.cudnn.enabled)"
      ],
      "metadata": {
        "id": "a9zbcPeS8W0Z",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "477a87ca-8180-42e4-f948-60ced7b34d60"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "90100\n",
            "True\n",
            "True\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [],
      "metadata": {
        "id": "Z1b5Z4EXEJNx"
      },
      "execution_count": null,
      "outputs": []
    }
  ]
}